// pages/cate/cate.js
import{
  ajaxFun
  } from"../../utils/ajax"
Page({

  data: {
     list:[],
     i:0
  },
  onLoad(){
    this.getData()
  },

  async getData(){
   let list= await ajaxFun("/category","get");
   this.setData({
     list
   })
  },
  getIndex(e){
   let i=e.target.dataset.index;
   this.setData({
     i
   })
  }

})